package com.example.demo;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * Created by 敲代码的卡卡罗特
 * on 2018/6/20 23:15.
 */
@Component
public class Consumer {
    @JmsListener(destination="itcast")
    public void readMessage(String text){
        System.out.println("接收到消息:"+text);
    }

    @JmsListener(destination="itcast_map")
    public void readMapMessage(Map map){
        System.out.println(map);
    }
}
